/**
 * User: 蕨菜
 * Date: 2019-05-15
 * Time: 09:54
 * Description: 此文件简要说明
 */

module.exports = function (sequelize, dataTypes) {
    return sequelize.define('student', {
        id: {
            type: dataTypes.BIGINT(11),
            allowNull: false,
            primaryKey: true,
            autoIncrement: true,
            unique: true,
            comment: '学生id',
        },
        name: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '学生名'
        },
        sex: {
            type: dataTypes.ENUM,
            values: ['0', '1'],
            allowNull: false,
            comment: '性别'
        },
        phone: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '手机号'
        },
        studentId: {
            type: dataTypes.STRING,
            allowNull: false,
            unique: true,
            comment: '学生学号',
        },
        father: {
            type: dataTypes.STRING,
            comment: '父亲姓名',
        },
        fatherPhone: {
            type: dataTypes.STRING,
            comment: '父亲手机号',
        },
        mother: {
            type: dataTypes.STRING,
            comment: '母亲姓名',
        },
        motherPhone: {
            type: dataTypes.STRING,
            comment: '母亲电话号码',
        },
        address: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '家庭住址',
        },
        active: {
            type: dataTypes.BOOLEAN,
            allowNull: false,
            comment: '是否处于激活状态'
        }
    })
}
